package org;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by yangshunxing on 2017/6/23.
 */
public class Observabler implements Observer {
    private String name;
    Observabler(String name){
        this.name = name;
    }
    @Override
    public void update(Observable o, Object arg) {
        if (arg.equals(this))
        System.out.println(this.name+"来了");
    }
}
